package com.xmy.cultivate.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.Recruit;
import com.xmy.cultivate.entity.RecruitList;
import com.xmy.cultivate.entity.TryJob;
import com.xmy.cultivate.mapper.TryJobMapper;
import com.xmy.cultivate.service.ITryJobService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 试岗 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2024-12-08
 */
@Service
public class TryJobServiceImpl extends ServiceImpl<TryJobMapper, TryJob> implements ITryJobService {

    @Autowired
    private TryJobMapper tryJobMapper;
    @Override
    public List<TryJob> queryTryJobList(IPage<TryJob> page , String startDate, String endDate, String type, String name, String schoolId, String subjectId) {

        return tryJobMapper.queryTryJobList(page ,startDate, endDate,type, name, schoolId,  subjectId);
    }

    @Override
    public List<TryJob> getAllocateSchoolList(String stationId) {
        return tryJobMapper.getAllocateSchoolList(stationId);
    }

    @Override
    public List<TryJob> getTryJobPopUpList(String schoolId, Long teacherId) {
        return tryJobMapper.getTryJobPopUpList(schoolId, teacherId);
    }

    @Override
    public List<TryJob> getManagerTryJobPopUpList(String schoolId, Long teacherId,String subjectsId) {
        return tryJobMapper.getManagerTryJobPopUpList(schoolId, teacherId,  subjectsId);
    }

    @Override
    public List<RecruitList> tryJobRate(String startDate, String endDate, String departmentId, String stationsId, String labourId, String type, String yearPart, String quarterNum, String dateType, String theirType, String subjectsId) {
        return tryJobMapper.tryJobRate(startDate, endDate, departmentId, stationsId, labourId, type, yearPart, quarterNum, dateType, theirType, subjectsId);
    }

    @Override
    public IPage<Recruit> tryJobRateDetails(IPage<?> page, String startDate, String endDate, String departmentId, String stationsId, String labourId, String type, String inviterId, String yearPart, String quarterNum, String dateType, String recruitStatus, String theirType, String subjectsId) {
        return tryJobMapper.tryJobRateDetails(page, startDate, endDate, departmentId, stationsId, labourId, type, inviterId, yearPart, quarterNum, dateType, recruitStatus, theirType, subjectsId);
    }


    public TryJob  getTryJobById(Long id){
        return tryJobMapper.getTryJobById(id);
    }

    @Override
    public List<TryJob> getForceCommentList(String schoolId, String subjectsId, String formattedDate) {
        return tryJobMapper.getForceCommentList(schoolId, subjectsId, formattedDate);
    }


}
